\hypertarget{class_particle}{
\section{Particle Class Reference}
\label{class_particle}\index{Particle@{Particle}}
}


base particle class to all others, it is used and extended to represent fluid and rigid bodies  




{\ttfamily \#include $<$Particle.h$>$}



Inheritance diagram for Particle:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=600pt]{class_particle__inherit__graph}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hyperlink{class_particle_a40f4c7e248029d72e7714b7802d5e5e1}{Particle} ()
\begin{DoxyCompactList}\small\item\em ctor \end{DoxyCompactList}\item 
\hyperlink{class_particle_a3fafefa897df125de05eb3455326e646}{Particle} (const \hyperlink{class_particle}{Particle} \&\_\-particle)
\begin{DoxyCompactList}\small\item\em copy ctor \end{DoxyCompactList}\item 
\hyperlink{class_particle_a489c1ce89566d9ff3666d5455d0290a6}{Particle} (const int \_\-id, const ngl::Real \_\-mass, const ngl::Vector \_\-position, const ngl::Colour \_\-colour, const ngl::Real \_\-radius, const bool \_\-moveable=true, const ngl::Vector \_\-velocity=0, const ngl::Vector \_\-acceleration=0, const ngl::Vector \_\-netForce=0)
\begin{DoxyCompactList}\small\item\em ctor \end{DoxyCompactList}\item 
\hyperlink{class_particle_ad030d0fe7b88cf81744b127c99244ff4}{$\sim$Particle} ()
\begin{DoxyCompactList}\small\item\em dtor \end{DoxyCompactList}\item 
int \hyperlink{class_particle_ad9688047786047c9fecf0c304b4f6294}{getId} () const 
\begin{DoxyCompactList}\small\item\em return the id \end{DoxyCompactList}\item 
void \hyperlink{class_particle_a874b156fe77eec11b80075c5708c283c}{setId} (const int \_\-id)
\begin{DoxyCompactList}\small\item\em sets the id \end{DoxyCompactList}\item 
ngl::Real \hyperlink{class_particle_a51c37948e3b1e36f812be660c306c93b}{getMass} () const 
\begin{DoxyCompactList}\small\item\em return the mass \end{DoxyCompactList}\item 
ngl::Vector \hyperlink{class_particle_aaac2b15b45cd70fddfb6736290458e76}{getLastPosition} () const 
\begin{DoxyCompactList}\small\item\em return the last position \end{DoxyCompactList}\item 
ngl::Vector \hyperlink{class_particle_ab468229903b17bb8cb724f17e5b87e81}{getPosition} () const 
\begin{DoxyCompactList}\small\item\em return the current position \end{DoxyCompactList}\item 
void \hyperlink{class_particle_a6e5693325b3f5b49458e66624576a0a7}{setPosition} (const ngl::Vector \_\-p)
\begin{DoxyCompactList}\small\item\em sets the position \end{DoxyCompactList}\item 
void \hyperlink{class_particle_a4ea44dad91df2b0374f2d40d44452b76}{updatePosition} (const ngl::Vector \_\-p)
\begin{DoxyCompactList}\small\item\em update the position to a new value \end{DoxyCompactList}\item 
ngl::Vector \hyperlink{class_particle_ab12a2455cfdb31df6dd9e67eaffee833}{getLastVelocity} () const 
\begin{DoxyCompactList}\small\item\em return the last velocity \end{DoxyCompactList}\item 
ngl::Vector \hyperlink{class_particle_ad31c8be63589edfba506727773967031}{getVelocity} () const 
\begin{DoxyCompactList}\small\item\em return the current velocity \end{DoxyCompactList}\item 
void \hyperlink{class_particle_ad823b77c5f15777b71f2756698c6ec23}{setVelocity} (const ngl::Vector \_\-v)
\begin{DoxyCompactList}\small\item\em sets the velocity \end{DoxyCompactList}\item 
void \hyperlink{class_particle_adacb41b0128b528cb8313337fa224672}{updateVelocity} (const ngl::Vector \_\-v)
\begin{DoxyCompactList}\small\item\em update the velocity to a new value \end{DoxyCompactList}\item 
void \hyperlink{class_particle_a9aa2597ad1c63ab4b5dd9ad0ecc9dc30}{resetForce} ()
\begin{DoxyCompactList}\small\item\em reset all the forces \end{DoxyCompactList}\item 
ngl::Vector \hyperlink{class_particle_aa2d47cd6b196082fffc22b5f43e6d237}{getNetForce} () const 
\begin{DoxyCompactList}\small\item\em return the net force \end{DoxyCompactList}\item 
void \hyperlink{class_particle_a24264d18fa3d978645c9b6375775eb00}{accumulateNetForce} (const ngl::Vector \_\-f)
\begin{DoxyCompactList}\small\item\em add in a force to the accumulated force \end{DoxyCompactList}\item 
ngl::Vector \hyperlink{class_particle_ab3de889d46b3e95cf91b08674865d128}{getLastAcceleration} () const 
\begin{DoxyCompactList}\small\item\em return the last acceleration \end{DoxyCompactList}\item 
ngl::Vector \hyperlink{class_particle_aa9e310d79a6542dfdceb069951334b10}{getAcceleration} () const 
\begin{DoxyCompactList}\small\item\em return the current acceleration \end{DoxyCompactList}\item 
void \hyperlink{class_particle_a2d8c30c2a4da4ed1965683c69c59c5e3}{setAcceleration} (const ngl::Vector \_\-a)
\begin{DoxyCompactList}\small\item\em set the acceleration \end{DoxyCompactList}\item 
void \hyperlink{class_particle_a1ad815ce0e529bf2537ea57053b4d8d2}{updateAcceleration} (const ngl::Vector \_\-a)
\begin{DoxyCompactList}\small\item\em update the acceleration \end{DoxyCompactList}\item 
bool \hyperlink{class_particle_a27b98cc9d4daa9bd449c959ca87c17ed}{getMoveable} () const 
\begin{DoxyCompactList}\small\item\em return whether the particle is static \end{DoxyCompactList}\item 
void \hyperlink{class_particle_a45570bd2e328611492be6486a2fd9569}{setMoveable} (const bool \_\-f)
\begin{DoxyCompactList}\small\item\em set a flag to determine whether the particle is static \end{DoxyCompactList}\item 
ngl::Real \hyperlink{class_particle_a6661cf5ffb7e3508ad04ff34c68f93fa}{getRadius} () const 
\begin{DoxyCompactList}\small\item\em return the radius \end{DoxyCompactList}\item 
void \hyperlink{class_particle_a14bad2d70fe14024012065e4d0f11019}{setRadius} (const ngl::Real \_\-c)
\begin{DoxyCompactList}\small\item\em set the radius \end{DoxyCompactList}\item 
ngl::Colour \hyperlink{class_particle_a956336d1598c253f954d3ddcb28183fa}{getColour} () const 
\begin{DoxyCompactList}\small\item\em return the current colour \end{DoxyCompactList}\item 
void \hyperlink{class_particle_ad772bb727ce98d9f27eb37c795d8a874}{setColour} (const ngl::Colour \_\-c)
\begin{DoxyCompactList}\small\item\em set the colour \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Protected Attributes}
\begin{DoxyCompactItemize}
\item 
int \hyperlink{class_particle_a24c5edf015f4c3d067acf1a054f31f93}{m\_\-id}
\begin{DoxyCompactList}\small\item\em unique id of the particle \end{DoxyCompactList}\item 
ngl::Real \hyperlink{class_particle_ab166ef7b23d6516e11f42adca0d6620e}{m\_\-mass}
\begin{DoxyCompactList}\small\item\em mass of the particle \end{DoxyCompactList}\item 
ngl::Vector \hyperlink{class_particle_aeeb21b06bc3c2152e452226e2b25a6ea}{m\_\-lastPosition}
\begin{DoxyCompactList}\small\item\em last position of the particle \end{DoxyCompactList}\item 
ngl::Vector \hyperlink{class_particle_a007f72451152f103007131841c6aa3ee}{m\_\-position}
\begin{DoxyCompactList}\small\item\em position of the particle \end{DoxyCompactList}\item 
ngl::Vector \hyperlink{class_particle_ac5c460e66588981d09c3aa86b920d8bb}{m\_\-lastVelocity}
\begin{DoxyCompactList}\small\item\em last velocity of the particle \end{DoxyCompactList}\item 
ngl::Vector \hyperlink{class_particle_a31dc45960d8fe1d02407577e46f81b30}{m\_\-velocity}
\begin{DoxyCompactList}\small\item\em velocity of the particle \end{DoxyCompactList}\item 
ngl::Vector \hyperlink{class_particle_a352c3a71df0b2dc011808e8fc0ace062}{m\_\-lastAcceleration}
\begin{DoxyCompactList}\small\item\em last acceleration of the particle \end{DoxyCompactList}\item 
ngl::Vector \hyperlink{class_particle_a3c4d484c30f2a5eaf7f5bcbcf6e7d94e}{m\_\-acceleration}
\begin{DoxyCompactList}\small\item\em acceleration of the particle \end{DoxyCompactList}\item 
ngl::Vector \hyperlink{class_particle_ad328d5b0f44818766286c928e436d36c}{m\_\-netForce}
\begin{DoxyCompactList}\small\item\em net force on the particle \end{DoxyCompactList}\item 
ngl::Real \hyperlink{class_particle_a68d488694d8b7155b9cfc10fa7062949}{m\_\-moveable}
\begin{DoxyCompactList}\small\item\em flag for moveability \end{DoxyCompactList}\item 
ngl::Real \hyperlink{class_particle_a08940f7cef8d91d87d165813a283d579}{m\_\-radius}
\begin{DoxyCompactList}\small\item\em collision sphere radius \end{DoxyCompactList}\item 
ngl::Colour \hyperlink{class_particle_a6095555452db7271e32380a188e1004e}{m\_\-colour}
\begin{DoxyCompactList}\small\item\em colour of particle for rendering \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
base particle class to all others, it is used and extended to represent fluid and rigid bodies 

Definition at line 20 of file Particle.h.



\subsection{Constructor \& Destructor Documentation}
\hypertarget{class_particle_a40f4c7e248029d72e7714b7802d5e5e1}{
\index{Particle@{Particle}!Particle@{Particle}}
\index{Particle@{Particle}!Particle@{Particle}}
\subsubsection[{Particle}]{\setlength{\rightskip}{0pt plus 5cm}Particle::Particle (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}
\label{class_particle_a40f4c7e248029d72e7714b7802d5e5e1}


ctor 



Definition at line 6 of file Particle.cpp.


\begin{DoxyCode}
{
    Particle::Particle(0, 0, 0, 0, 0);
}
\end{DoxyCode}
\hypertarget{class_particle_a3fafefa897df125de05eb3455326e646}{
\index{Particle@{Particle}!Particle@{Particle}}
\index{Particle@{Particle}!Particle@{Particle}}
\subsubsection[{Particle}]{\setlength{\rightskip}{0pt plus 5cm}Particle::Particle (
\begin{DoxyParamCaption}
\item[{const {\bf Particle} \&}]{\_\-particle}
\end{DoxyParamCaption}
)}}
\label{class_particle_a3fafefa897df125de05eb3455326e646}


copy ctor 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em \_\-particle} & the copied object \\
\hline
\end{DoxyParams}


Definition at line 11 of file Particle.cpp.



References getAcceleration(), getColour(), getId(), getMass(), getMoveable(), getNetForce(), getPosition(), getRadius(), getVelocity(), m\_\-acceleration, m\_\-colour, m\_\-id, m\_\-lastAcceleration, m\_\-lastPosition, m\_\-lastVelocity, m\_\-mass, m\_\-moveable, m\_\-netForce, m\_\-position, m\_\-radius, and m\_\-velocity.


\begin{DoxyCode}
{
    m_id = _particle.getId();

    m_mass = _particle.getMass();

    m_position = _particle.getPosition();
    m_lastPosition = m_position;

    m_velocity = _particle.getVelocity();
    m_lastVelocity = m_velocity;

    m_acceleration = _particle.getAcceleration();
    m_lastAcceleration = m_acceleration;

    m_netForce = _particle.getNetForce();

    m_moveable = _particle.getMoveable();

    m_radius = _particle.getRadius();

    m_colour = _particle.getColour();
}
\end{DoxyCode}


Here is the call graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=330pt]{class_particle_a3fafefa897df125de05eb3455326e646_cgraph}
\end{center}
\end{figure}


\hypertarget{class_particle_a489c1ce89566d9ff3666d5455d0290a6}{
\index{Particle@{Particle}!Particle@{Particle}}
\index{Particle@{Particle}!Particle@{Particle}}
\subsubsection[{Particle}]{\setlength{\rightskip}{0pt plus 5cm}Particle::Particle (
\begin{DoxyParamCaption}
\item[{const int}]{\_\-id, }
\item[{const ngl::Real}]{\_\-mass, }
\item[{const ngl::Vector}]{\_\-position, }
\item[{const ngl::Colour}]{\_\-colour, }
\item[{const ngl::Real}]{\_\-radius, }
\item[{const bool}]{\_\-moveable = {\ttfamily true}, }
\item[{const ngl::Vector}]{\_\-velocity = {\ttfamily 0}, }
\item[{const ngl::Vector}]{\_\-acceleration = {\ttfamily 0}, }
\item[{const ngl::Vector}]{\_\-netForce = {\ttfamily 0}}
\end{DoxyParamCaption}
)}}
\label{class_particle_a489c1ce89566d9ff3666d5455d0290a6}


ctor 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em \_\-id} & the id of the particle \\
\hline
\mbox{\tt in}  & {\em \_\-mass} & the mass of the particle \\
\hline
\mbox{\tt in}  & {\em \_\-position} & the position of the particle \\
\hline
\mbox{\tt in}  & {\em \_\-colour} & the colour of the particle \\
\hline
\mbox{\tt in}  & {\em \_\-radius} & the radius of the particle \\
\hline
\mbox{\tt in}  & {\em \_\-moveable} & flag to determine whether particle is static \\
\hline
\mbox{\tt in}  & {\em \_\-velocity} & the velocity of the particle \\
\hline
\mbox{\tt in}  & {\em \_\-acceleration} & the acceleration of the particle \\
\hline
\mbox{\tt in}  & {\em \_\-netForce} & the net force acting on the partcile \\
\hline
\end{DoxyParams}


Definition at line 36 of file Particle.cpp.


\begin{DoxyCode}
{
    //init params
    m_id = _id;

    m_mass = _mass;

    m_position = _position;
    m_lastPosition = m_position;

    m_velocity = _velocity;
    m_lastVelocity = m_velocity;

    m_acceleration = _acceleration;
    m_lastAcceleration = m_acceleration;

    m_netForce = _netForce;

    m_moveable = _moveable;

    m_radius = _radius;

    m_colour = _colour;
}
\end{DoxyCode}
\hypertarget{class_particle_ad030d0fe7b88cf81744b127c99244ff4}{
\index{Particle@{Particle}!$\sim$Particle@{$\sim$Particle}}
\index{$\sim$Particle@{$\sim$Particle}!Particle@{Particle}}
\subsubsection[{$\sim$Particle}]{\setlength{\rightskip}{0pt plus 5cm}Particle::$\sim$Particle (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}
\label{class_particle_ad030d0fe7b88cf81744b127c99244ff4}


dtor 



Definition at line 71 of file Particle.cpp.


\begin{DoxyCode}
{
}
\end{DoxyCode}


\subsection{Member Function Documentation}
\hypertarget{class_particle_a24264d18fa3d978645c9b6375775eb00}{
\index{Particle@{Particle}!accumulateNetForce@{accumulateNetForce}}
\index{accumulateNetForce@{accumulateNetForce}!Particle@{Particle}}
\subsubsection[{accumulateNetForce}]{\setlength{\rightskip}{0pt plus 5cm}void Particle::accumulateNetForce (
\begin{DoxyParamCaption}
\item[{const ngl::Vector}]{\_\-f}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{class_particle_a24264d18fa3d978645c9b6375775eb00}


add in a force to the accumulated force 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em \_\-f} & the force to add \\
\hline
\end{DoxyParams}


Definition at line 102 of file Particle.h.



References m\_\-netForce.


\begin{DoxyCode}
{ m_netForce += _f; }
\end{DoxyCode}
\hypertarget{class_particle_aa9e310d79a6542dfdceb069951334b10}{
\index{Particle@{Particle}!getAcceleration@{getAcceleration}}
\index{getAcceleration@{getAcceleration}!Particle@{Particle}}
\subsubsection[{getAcceleration}]{\setlength{\rightskip}{0pt plus 5cm}ngl::Vector Particle::getAcceleration (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{class_particle_aa9e310d79a6542dfdceb069951334b10}


return the current acceleration 



Definition at line 108 of file Particle.h.



References m\_\-acceleration.


\begin{DoxyCode}
{ return m_acceleration; }
\end{DoxyCode}


Here is the caller graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_particle_aa9e310d79a6542dfdceb069951334b10_icgraph}
\end{center}
\end{figure}


\hypertarget{class_particle_a956336d1598c253f954d3ddcb28183fa}{
\index{Particle@{Particle}!getColour@{getColour}}
\index{getColour@{getColour}!Particle@{Particle}}
\subsubsection[{getColour}]{\setlength{\rightskip}{0pt plus 5cm}ngl::Colour Particle::getColour (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{class_particle_a956336d1598c253f954d3ddcb28183fa}


return the current colour 



Definition at line 133 of file Particle.h.



References m\_\-colour.


\begin{DoxyCode}
{ return m_colour; }
\end{DoxyCode}


Here is the caller graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_particle_a956336d1598c253f954d3ddcb28183fa_icgraph}
\end{center}
\end{figure}


\hypertarget{class_particle_ad9688047786047c9fecf0c304b4f6294}{
\index{Particle@{Particle}!getId@{getId}}
\index{getId@{getId}!Particle@{Particle}}
\subsubsection[{getId}]{\setlength{\rightskip}{0pt plus 5cm}int Particle::getId (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{class_particle_ad9688047786047c9fecf0c304b4f6294}


return the id 



Definition at line 57 of file Particle.h.



References m\_\-id.


\begin{DoxyCode}
{ return m_id; }
\end{DoxyCode}


Here is the caller graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_particle_ad9688047786047c9fecf0c304b4f6294_icgraph}
\end{center}
\end{figure}


\hypertarget{class_particle_ab3de889d46b3e95cf91b08674865d128}{
\index{Particle@{Particle}!getLastAcceleration@{getLastAcceleration}}
\index{getLastAcceleration@{getLastAcceleration}!Particle@{Particle}}
\subsubsection[{getLastAcceleration}]{\setlength{\rightskip}{0pt plus 5cm}ngl::Vector Particle::getLastAcceleration (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{class_particle_ab3de889d46b3e95cf91b08674865d128}


return the last acceleration 



Definition at line 105 of file Particle.h.



References m\_\-lastAcceleration.


\begin{DoxyCode}
{ return m_lastAcceleration; }
\end{DoxyCode}


Here is the caller graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_particle_ab3de889d46b3e95cf91b08674865d128_icgraph}
\end{center}
\end{figure}


\hypertarget{class_particle_aaac2b15b45cd70fddfb6736290458e76}{
\index{Particle@{Particle}!getLastPosition@{getLastPosition}}
\index{getLastPosition@{getLastPosition}!Particle@{Particle}}
\subsubsection[{getLastPosition}]{\setlength{\rightskip}{0pt plus 5cm}ngl::Vector Particle::getLastPosition (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{class_particle_aaac2b15b45cd70fddfb6736290458e76}


return the last position 



Definition at line 67 of file Particle.h.



References m\_\-lastPosition.


\begin{DoxyCode}
{ return m_lastPosition; }
\end{DoxyCode}
\hypertarget{class_particle_ab12a2455cfdb31df6dd9e67eaffee833}{
\index{Particle@{Particle}!getLastVelocity@{getLastVelocity}}
\index{getLastVelocity@{getLastVelocity}!Particle@{Particle}}
\subsubsection[{getLastVelocity}]{\setlength{\rightskip}{0pt plus 5cm}ngl::Vector Particle::getLastVelocity (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{class_particle_ab12a2455cfdb31df6dd9e67eaffee833}


return the last velocity 



Definition at line 81 of file Particle.h.



References m\_\-lastVelocity.


\begin{DoxyCode}
{ return m_lastVelocity; }
\end{DoxyCode}
\hypertarget{class_particle_a51c37948e3b1e36f812be660c306c93b}{
\index{Particle@{Particle}!getMass@{getMass}}
\index{getMass@{getMass}!Particle@{Particle}}
\subsubsection[{getMass}]{\setlength{\rightskip}{0pt plus 5cm}ngl::Real Particle::getMass (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{class_particle_a51c37948e3b1e36f812be660c306c93b}


return the mass 



Definition at line 64 of file Particle.h.



References m\_\-mass.


\begin{DoxyCode}
{ return m_mass; }
\end{DoxyCode}


Here is the caller graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_particle_a51c37948e3b1e36f812be660c306c93b_icgraph}
\end{center}
\end{figure}


\hypertarget{class_particle_a27b98cc9d4daa9bd449c959ca87c17ed}{
\index{Particle@{Particle}!getMoveable@{getMoveable}}
\index{getMoveable@{getMoveable}!Particle@{Particle}}
\subsubsection[{getMoveable}]{\setlength{\rightskip}{0pt plus 5cm}bool Particle::getMoveable (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{class_particle_a27b98cc9d4daa9bd449c959ca87c17ed}


return whether the particle is static 



Definition at line 119 of file Particle.h.



References m\_\-moveable.


\begin{DoxyCode}
{ return m_moveable; }
\end{DoxyCode}


Here is the caller graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_particle_a27b98cc9d4daa9bd449c959ca87c17ed_icgraph}
\end{center}
\end{figure}


\hypertarget{class_particle_aa2d47cd6b196082fffc22b5f43e6d237}{
\index{Particle@{Particle}!getNetForce@{getNetForce}}
\index{getNetForce@{getNetForce}!Particle@{Particle}}
\subsubsection[{getNetForce}]{\setlength{\rightskip}{0pt plus 5cm}ngl::Vector Particle::getNetForce (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{class_particle_aa2d47cd6b196082fffc22b5f43e6d237}


return the net force 



Definition at line 98 of file Particle.h.



References m\_\-netForce.


\begin{DoxyCode}
{ return m_netForce; }
\end{DoxyCode}


Here is the caller graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=316pt]{class_particle_aa2d47cd6b196082fffc22b5f43e6d237_icgraph}
\end{center}
\end{figure}


\hypertarget{class_particle_ab468229903b17bb8cb724f17e5b87e81}{
\index{Particle@{Particle}!getPosition@{getPosition}}
\index{getPosition@{getPosition}!Particle@{Particle}}
\subsubsection[{getPosition}]{\setlength{\rightskip}{0pt plus 5cm}ngl::Vector Particle::getPosition (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{class_particle_ab468229903b17bb8cb724f17e5b87e81}


return the current position 



Definition at line 70 of file Particle.h.



References m\_\-position.


\begin{DoxyCode}
{ return m_position; }
\end{DoxyCode}


Here is the caller graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_particle_ab468229903b17bb8cb724f17e5b87e81_icgraph}
\end{center}
\end{figure}


\hypertarget{class_particle_a6661cf5ffb7e3508ad04ff34c68f93fa}{
\index{Particle@{Particle}!getRadius@{getRadius}}
\index{getRadius@{getRadius}!Particle@{Particle}}
\subsubsection[{getRadius}]{\setlength{\rightskip}{0pt plus 5cm}ngl::Real Particle::getRadius (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{class_particle_a6661cf5ffb7e3508ad04ff34c68f93fa}


return the radius 



Definition at line 126 of file Particle.h.



References m\_\-radius.


\begin{DoxyCode}
{ return m_radius; }
\end{DoxyCode}


Here is the caller graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_particle_a6661cf5ffb7e3508ad04ff34c68f93fa_icgraph}
\end{center}
\end{figure}


\hypertarget{class_particle_ad31c8be63589edfba506727773967031}{
\index{Particle@{Particle}!getVelocity@{getVelocity}}
\index{getVelocity@{getVelocity}!Particle@{Particle}}
\subsubsection[{getVelocity}]{\setlength{\rightskip}{0pt plus 5cm}ngl::Vector Particle::getVelocity (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{class_particle_ad31c8be63589edfba506727773967031}


return the current velocity 



Definition at line 84 of file Particle.h.



References m\_\-velocity.


\begin{DoxyCode}
{ return m_velocity; }
\end{DoxyCode}


Here is the caller graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_particle_ad31c8be63589edfba506727773967031_icgraph}
\end{center}
\end{figure}


\hypertarget{class_particle_a9aa2597ad1c63ab4b5dd9ad0ecc9dc30}{
\index{Particle@{Particle}!resetForce@{resetForce}}
\index{resetForce@{resetForce}!Particle@{Particle}}
\subsubsection[{resetForce}]{\setlength{\rightskip}{0pt plus 5cm}void Particle::resetForce (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{class_particle_a9aa2597ad1c63ab4b5dd9ad0ecc9dc30}


reset all the forces 



Reimplemented in \hyperlink{class_fluid_particle_a90079205a22d0defb825b92c1b9ad282}{FluidParticle}.



Definition at line 95 of file Particle.h.



References m\_\-netForce.


\begin{DoxyCode}
{ m_netForce = 0; }
\end{DoxyCode}
\hypertarget{class_particle_a2d8c30c2a4da4ed1965683c69c59c5e3}{
\index{Particle@{Particle}!setAcceleration@{setAcceleration}}
\index{setAcceleration@{setAcceleration}!Particle@{Particle}}
\subsubsection[{setAcceleration}]{\setlength{\rightskip}{0pt plus 5cm}void Particle::setAcceleration (
\begin{DoxyParamCaption}
\item[{const ngl::Vector}]{\_\-a}
\end{DoxyParamCaption}
)}}
\label{class_particle_a2d8c30c2a4da4ed1965683c69c59c5e3}


set the acceleration 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em \_\-a} & the new acceleration \\
\hline
\end{DoxyParams}


Definition at line 107 of file Particle.cpp.



References m\_\-acceleration, and m\_\-lastAcceleration.


\begin{DoxyCode}
{
    //set velocities to new value
    m_lastAcceleration = _a;
    m_acceleration = _a;
}
\end{DoxyCode}


Here is the caller graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_particle_a2d8c30c2a4da4ed1965683c69c59c5e3_icgraph}
\end{center}
\end{figure}


\hypertarget{class_particle_ad772bb727ce98d9f27eb37c795d8a874}{
\index{Particle@{Particle}!setColour@{setColour}}
\index{setColour@{setColour}!Particle@{Particle}}
\subsubsection[{setColour}]{\setlength{\rightskip}{0pt plus 5cm}void Particle::setColour (
\begin{DoxyParamCaption}
\item[{const ngl::Colour}]{\_\-c}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{class_particle_ad772bb727ce98d9f27eb37c795d8a874}


set the colour 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em \_\-c} & the new colour \\
\hline
\end{DoxyParams}


Definition at line 137 of file Particle.h.



References m\_\-colour.


\begin{DoxyCode}
{ m_colour = _c; }
\end{DoxyCode}
\hypertarget{class_particle_a874b156fe77eec11b80075c5708c283c}{
\index{Particle@{Particle}!setId@{setId}}
\index{setId@{setId}!Particle@{Particle}}
\subsubsection[{setId}]{\setlength{\rightskip}{0pt plus 5cm}void Particle::setId (
\begin{DoxyParamCaption}
\item[{const int}]{\_\-id}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{class_particle_a874b156fe77eec11b80075c5708c283c}


sets the id 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em \_\-id} & the id \\
\hline
\end{DoxyParams}


Definition at line 61 of file Particle.h.



References m\_\-id.


\begin{DoxyCode}
{ m_id = _id; }
\end{DoxyCode}


Here is the caller graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_particle_a874b156fe77eec11b80075c5708c283c_icgraph}
\end{center}
\end{figure}


\hypertarget{class_particle_a45570bd2e328611492be6486a2fd9569}{
\index{Particle@{Particle}!setMoveable@{setMoveable}}
\index{setMoveable@{setMoveable}!Particle@{Particle}}
\subsubsection[{setMoveable}]{\setlength{\rightskip}{0pt plus 5cm}void Particle::setMoveable (
\begin{DoxyParamCaption}
\item[{const bool}]{\_\-f}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{class_particle_a45570bd2e328611492be6486a2fd9569}


set a flag to determine whether the particle is static 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em \_\-f} & the flag to determine whether particle is static \\
\hline
\end{DoxyParams}


Definition at line 123 of file Particle.h.



References m\_\-moveable.


\begin{DoxyCode}
{ m_moveable = _f; }
\end{DoxyCode}
\hypertarget{class_particle_a6e5693325b3f5b49458e66624576a0a7}{
\index{Particle@{Particle}!setPosition@{setPosition}}
\index{setPosition@{setPosition}!Particle@{Particle}}
\subsubsection[{setPosition}]{\setlength{\rightskip}{0pt plus 5cm}void Particle::setPosition (
\begin{DoxyParamCaption}
\item[{const ngl::Vector}]{\_\-p}
\end{DoxyParamCaption}
)}}
\label{class_particle_a6e5693325b3f5b49458e66624576a0a7}


sets the position 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em \_\-p} & the new position \\
\hline
\end{DoxyParams}


Definition at line 75 of file Particle.cpp.



References m\_\-lastPosition, and m\_\-position.


\begin{DoxyCode}
{
    //set positions to new value
    m_lastPosition = _p;
    m_position = _p;
}
\end{DoxyCode}


Here is the caller graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_particle_a6e5693325b3f5b49458e66624576a0a7_icgraph}
\end{center}
\end{figure}


\hypertarget{class_particle_a14bad2d70fe14024012065e4d0f11019}{
\index{Particle@{Particle}!setRadius@{setRadius}}
\index{setRadius@{setRadius}!Particle@{Particle}}
\subsubsection[{setRadius}]{\setlength{\rightskip}{0pt plus 5cm}void Particle::setRadius (
\begin{DoxyParamCaption}
\item[{const ngl::Real}]{\_\-c}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{class_particle_a14bad2d70fe14024012065e4d0f11019}


set the radius 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em \_\-c} & the radius \\
\hline
\end{DoxyParams}


Definition at line 130 of file Particle.h.



References m\_\-radius.


\begin{DoxyCode}
{ m_radius = _c; }
\end{DoxyCode}
\hypertarget{class_particle_ad823b77c5f15777b71f2756698c6ec23}{
\index{Particle@{Particle}!setVelocity@{setVelocity}}
\index{setVelocity@{setVelocity}!Particle@{Particle}}
\subsubsection[{setVelocity}]{\setlength{\rightskip}{0pt plus 5cm}void Particle::setVelocity (
\begin{DoxyParamCaption}
\item[{const ngl::Vector}]{\_\-v}
\end{DoxyParamCaption}
)}}
\label{class_particle_ad823b77c5f15777b71f2756698c6ec23}


sets the velocity 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em \_\-v} & the new velocity \\
\hline
\end{DoxyParams}


Definition at line 91 of file Particle.cpp.



References m\_\-lastVelocity, and m\_\-velocity.


\begin{DoxyCode}
{
    //set velocities to new value
    m_lastVelocity = _v;
    m_velocity = _v;
}
\end{DoxyCode}


Here is the caller graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_particle_ad823b77c5f15777b71f2756698c6ec23_icgraph}
\end{center}
\end{figure}


\hypertarget{class_particle_a1ad815ce0e529bf2537ea57053b4d8d2}{
\index{Particle@{Particle}!updateAcceleration@{updateAcceleration}}
\index{updateAcceleration@{updateAcceleration}!Particle@{Particle}}
\subsubsection[{updateAcceleration}]{\setlength{\rightskip}{0pt plus 5cm}void Particle::updateAcceleration (
\begin{DoxyParamCaption}
\item[{const ngl::Vector}]{\_\-a}
\end{DoxyParamCaption}
)}}
\label{class_particle_a1ad815ce0e529bf2537ea57053b4d8d2}


update the acceleration 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em \_\-a} & the new acceleration \\
\hline
\end{DoxyParams}


Definition at line 114 of file Particle.cpp.



References m\_\-acceleration, and m\_\-lastAcceleration.


\begin{DoxyCode}
{
    //save current value
    m_lastAcceleration = m_acceleration;

    //update to new value
    m_acceleration = _a;
}
\end{DoxyCode}
\hypertarget{class_particle_a4ea44dad91df2b0374f2d40d44452b76}{
\index{Particle@{Particle}!updatePosition@{updatePosition}}
\index{updatePosition@{updatePosition}!Particle@{Particle}}
\subsubsection[{updatePosition}]{\setlength{\rightskip}{0pt plus 5cm}void Particle::updatePosition (
\begin{DoxyParamCaption}
\item[{const ngl::Vector}]{\_\-p}
\end{DoxyParamCaption}
)}}
\label{class_particle_a4ea44dad91df2b0374f2d40d44452b76}


update the position to a new value 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em \_\-p} & the new position \\
\hline
\end{DoxyParams}


Definition at line 82 of file Particle.cpp.



References m\_\-lastPosition, and m\_\-position.


\begin{DoxyCode}
{
    //save current value
    m_lastPosition = m_position;

    //update to new value
    m_position = _p;
}
\end{DoxyCode}


Here is the caller graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_particle_a4ea44dad91df2b0374f2d40d44452b76_icgraph}
\end{center}
\end{figure}


\hypertarget{class_particle_adacb41b0128b528cb8313337fa224672}{
\index{Particle@{Particle}!updateVelocity@{updateVelocity}}
\index{updateVelocity@{updateVelocity}!Particle@{Particle}}
\subsubsection[{updateVelocity}]{\setlength{\rightskip}{0pt plus 5cm}void Particle::updateVelocity (
\begin{DoxyParamCaption}
\item[{const ngl::Vector}]{\_\-v}
\end{DoxyParamCaption}
)}}
\label{class_particle_adacb41b0128b528cb8313337fa224672}


update the velocity to a new value 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em \_\-v} & the new velocity \\
\hline
\end{DoxyParams}


Definition at line 98 of file Particle.cpp.



References m\_\-lastVelocity, and m\_\-velocity.


\begin{DoxyCode}
{
    //save current value
    m_lastVelocity = m_velocity;

    //update to new value
    m_velocity = _v;
}
\end{DoxyCode}


Here is the caller graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_particle_adacb41b0128b528cb8313337fa224672_icgraph}
\end{center}
\end{figure}




\subsection{Member Data Documentation}
\hypertarget{class_particle_a3c4d484c30f2a5eaf7f5bcbcf6e7d94e}{
\index{Particle@{Particle}!m\_\-acceleration@{m\_\-acceleration}}
\index{m\_\-acceleration@{m\_\-acceleration}!Particle@{Particle}}
\subsubsection[{m\_\-acceleration}]{\setlength{\rightskip}{0pt plus 5cm}ngl::Vector {\bf Particle::m\_\-acceleration}\hspace{0.3cm}{\ttfamily  \mbox{[}protected\mbox{]}}}}
\label{class_particle_a3c4d484c30f2a5eaf7f5bcbcf6e7d94e}


acceleration of the particle 



Definition at line 162 of file Particle.h.

\hypertarget{class_particle_a6095555452db7271e32380a188e1004e}{
\index{Particle@{Particle}!m\_\-colour@{m\_\-colour}}
\index{m\_\-colour@{m\_\-colour}!Particle@{Particle}}
\subsubsection[{m\_\-colour}]{\setlength{\rightskip}{0pt plus 5cm}ngl::Colour {\bf Particle::m\_\-colour}\hspace{0.3cm}{\ttfamily  \mbox{[}protected\mbox{]}}}}
\label{class_particle_a6095555452db7271e32380a188e1004e}


colour of particle for rendering 



Definition at line 174 of file Particle.h.

\hypertarget{class_particle_a24c5edf015f4c3d067acf1a054f31f93}{
\index{Particle@{Particle}!m\_\-id@{m\_\-id}}
\index{m\_\-id@{m\_\-id}!Particle@{Particle}}
\subsubsection[{m\_\-id}]{\setlength{\rightskip}{0pt plus 5cm}int {\bf Particle::m\_\-id}\hspace{0.3cm}{\ttfamily  \mbox{[}protected\mbox{]}}}}
\label{class_particle_a24c5edf015f4c3d067acf1a054f31f93}


unique id of the particle 



Definition at line 141 of file Particle.h.

\hypertarget{class_particle_a352c3a71df0b2dc011808e8fc0ace062}{
\index{Particle@{Particle}!m\_\-lastAcceleration@{m\_\-lastAcceleration}}
\index{m\_\-lastAcceleration@{m\_\-lastAcceleration}!Particle@{Particle}}
\subsubsection[{m\_\-lastAcceleration}]{\setlength{\rightskip}{0pt plus 5cm}ngl::Vector {\bf Particle::m\_\-lastAcceleration}\hspace{0.3cm}{\ttfamily  \mbox{[}protected\mbox{]}}}}
\label{class_particle_a352c3a71df0b2dc011808e8fc0ace062}


last acceleration of the particle 



Definition at line 159 of file Particle.h.

\hypertarget{class_particle_aeeb21b06bc3c2152e452226e2b25a6ea}{
\index{Particle@{Particle}!m\_\-lastPosition@{m\_\-lastPosition}}
\index{m\_\-lastPosition@{m\_\-lastPosition}!Particle@{Particle}}
\subsubsection[{m\_\-lastPosition}]{\setlength{\rightskip}{0pt plus 5cm}ngl::Vector {\bf Particle::m\_\-lastPosition}\hspace{0.3cm}{\ttfamily  \mbox{[}protected\mbox{]}}}}
\label{class_particle_aeeb21b06bc3c2152e452226e2b25a6ea}


last position of the particle 



Definition at line 147 of file Particle.h.

\hypertarget{class_particle_ac5c460e66588981d09c3aa86b920d8bb}{
\index{Particle@{Particle}!m\_\-lastVelocity@{m\_\-lastVelocity}}
\index{m\_\-lastVelocity@{m\_\-lastVelocity}!Particle@{Particle}}
\subsubsection[{m\_\-lastVelocity}]{\setlength{\rightskip}{0pt plus 5cm}ngl::Vector {\bf Particle::m\_\-lastVelocity}\hspace{0.3cm}{\ttfamily  \mbox{[}protected\mbox{]}}}}
\label{class_particle_ac5c460e66588981d09c3aa86b920d8bb}


last velocity of the particle 



Definition at line 153 of file Particle.h.

\hypertarget{class_particle_ab166ef7b23d6516e11f42adca0d6620e}{
\index{Particle@{Particle}!m\_\-mass@{m\_\-mass}}
\index{m\_\-mass@{m\_\-mass}!Particle@{Particle}}
\subsubsection[{m\_\-mass}]{\setlength{\rightskip}{0pt plus 5cm}ngl::Real {\bf Particle::m\_\-mass}\hspace{0.3cm}{\ttfamily  \mbox{[}protected\mbox{]}}}}
\label{class_particle_ab166ef7b23d6516e11f42adca0d6620e}


mass of the particle 



Definition at line 144 of file Particle.h.

\hypertarget{class_particle_a68d488694d8b7155b9cfc10fa7062949}{
\index{Particle@{Particle}!m\_\-moveable@{m\_\-moveable}}
\index{m\_\-moveable@{m\_\-moveable}!Particle@{Particle}}
\subsubsection[{m\_\-moveable}]{\setlength{\rightskip}{0pt plus 5cm}ngl::Real {\bf Particle::m\_\-moveable}\hspace{0.3cm}{\ttfamily  \mbox{[}protected\mbox{]}}}}
\label{class_particle_a68d488694d8b7155b9cfc10fa7062949}


flag for moveability 



Definition at line 168 of file Particle.h.

\hypertarget{class_particle_ad328d5b0f44818766286c928e436d36c}{
\index{Particle@{Particle}!m\_\-netForce@{m\_\-netForce}}
\index{m\_\-netForce@{m\_\-netForce}!Particle@{Particle}}
\subsubsection[{m\_\-netForce}]{\setlength{\rightskip}{0pt plus 5cm}ngl::Vector {\bf Particle::m\_\-netForce}\hspace{0.3cm}{\ttfamily  \mbox{[}protected\mbox{]}}}}
\label{class_particle_ad328d5b0f44818766286c928e436d36c}


net force on the particle 



Definition at line 165 of file Particle.h.

\hypertarget{class_particle_a007f72451152f103007131841c6aa3ee}{
\index{Particle@{Particle}!m\_\-position@{m\_\-position}}
\index{m\_\-position@{m\_\-position}!Particle@{Particle}}
\subsubsection[{m\_\-position}]{\setlength{\rightskip}{0pt plus 5cm}ngl::Vector {\bf Particle::m\_\-position}\hspace{0.3cm}{\ttfamily  \mbox{[}protected\mbox{]}}}}
\label{class_particle_a007f72451152f103007131841c6aa3ee}


position of the particle 



Definition at line 150 of file Particle.h.

\hypertarget{class_particle_a08940f7cef8d91d87d165813a283d579}{
\index{Particle@{Particle}!m\_\-radius@{m\_\-radius}}
\index{m\_\-radius@{m\_\-radius}!Particle@{Particle}}
\subsubsection[{m\_\-radius}]{\setlength{\rightskip}{0pt plus 5cm}ngl::Real {\bf Particle::m\_\-radius}\hspace{0.3cm}{\ttfamily  \mbox{[}protected\mbox{]}}}}
\label{class_particle_a08940f7cef8d91d87d165813a283d579}


collision sphere radius 



Definition at line 171 of file Particle.h.

\hypertarget{class_particle_a31dc45960d8fe1d02407577e46f81b30}{
\index{Particle@{Particle}!m\_\-velocity@{m\_\-velocity}}
\index{m\_\-velocity@{m\_\-velocity}!Particle@{Particle}}
\subsubsection[{m\_\-velocity}]{\setlength{\rightskip}{0pt plus 5cm}ngl::Vector {\bf Particle::m\_\-velocity}\hspace{0.3cm}{\ttfamily  \mbox{[}protected\mbox{]}}}}
\label{class_particle_a31dc45960d8fe1d02407577e46f81b30}


velocity of the particle 



Definition at line 156 of file Particle.h.



The documentation for this class was generated from the following files:\begin{DoxyCompactItemize}
\item 
include/\hyperlink{_particle_8h}{Particle.h}\item 
src/\hyperlink{_particle_8cpp}{Particle.cpp}\end{DoxyCompactItemize}
